import request from '@/utils/request'

// 查询员工管理列表
export function listSalesperson(query) {
  return request({
    url: '/salesperson/salesperson/list',
    method: 'get',
    params: query
  })
}

//查询所有销售员初始化供应商下拉列表
export function getSalespersons(){
	return request({
		url: '/salesperson/salesperson/getSalespersons',
		method: 'get'

	})
}


// 查询员工管理详细
export function getSalesperson(salespersonid) {
  return request({
    url: '/salesperson/salesperson/' + salespersonid,
    method: 'get'
  })
}

// 新增员工管理
export function addSalesperson(data) {
  return request({
    url: '/salesperson/salesperson',
    method: 'post',
    data: data
  })
}

// 修改员工管理
export function updateSalesperson(data) {
  return request({
    url: '/salesperson/salesperson',
    method: 'put',
    data: data
  })
}

// 删除员工管理
export function delSalesperson(salespersonid) {
  return request({
    url: '/salesperson/salesperson/' + salespersonid,
    method: 'delete'
  })
}
